{include file="../../../application/admin/view/public/head" /}

<style type="text/css">
    .layui-btn {
        padding: 0 8px;
    }
</style>
<div class="page-container p10">

      <div class="layui-form-item">
        <a class="layui-btn layui-btn-primary" href="{:url('index')}" data-title="{$vo.vod_name}" title="编辑">设置链接</a>
        <a class="layui-btn layui-btn-primary" href="{:url('list')}" data-title="{$vo.vod_name}" title="编辑">列表查看</a>
        <!--<a class="layui-btn layui-btn-primary" href="/app.php/tiantang/dealTiantangByOtherSetting" -->
        <!--title="编辑">全部更新</a>-->
        <a class="layui-btn layui-btn-primary" href="/app.php/tiankong/vodindex" 
        title="访问记录">访问记录</a>

          <a class="layui-btn layui-btn-primary" href="/app.php/tiankong/matchvodindex"
             title="访问记录">访问匹配</a>
      </div>

     <form class="layui-form " method="post" id="pageListForm">
         <table class="layui-table" lay-size="sm">
            <thead>
            <tr>
                <th width="50">编号</th>
                <th width="250">影片名称</th>
                <th width="250">天堂匹配</th>
                <th width="80">更新时间</th>
            </tr>
            </thead>

            {volist name="list" id="vo"}
            <tr>
                <td >{$vo.vod_id}</td>
                <td><a style="width:150px;color: #2400af;" href="/app.php/tiankong/index?title={$vo.vod_name}" 
    title="编辑">{$vo.vod_name}<br/>[{$vo.vod_id}]</a></td>
                <td >
                    <div class="checkifcunzai" data-id="{$vo.vod_id}" style="font-size: 10px; height: 60px;overflow-y:scroll;line-height: 15px;"></div>
                </td>
                <td>{$vo.vod_time|mac_day=color}</td>
            </tr>
            <script>
                $.post("{:url('tiantang/matchVod', ['_ajax'=>1,'id' => $vo['vod_id']])}",{},function(res) {
                    // console.log(res)
                        $(".checkifcunzai[data-id='{$vo.vod_id}']").html(res.msg)
                },"json");
            </script>
            {/volist}
            </tbody>
        </table>

        <div id="pages" class="center"></div>

    </form>
</div>

{include file="../../../application/admin/view/public/foot" /}


<script type="text/javascript">
    var curUrl="{:url('tiankong/matchvodindex',$param)}";
    layui.use(['laypage', 'layer'], function() {
        var laypage = layui.laypage
                , layer = layui.layer;

        // laypage.render({
        //     elem: 'pages'
        //     ,count: {$total}
        //     ,limit: {$limit}
        //     ,curr: {$page}
        //     ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
        //     ,jump: function(obj,first){
        //         if(!first){
        //             location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
        //         }
        //     }
        // });
    });
</script>
</body>
</html>